drop table if exists jms_dwd.dwd_all_operation_cnt_detail_dt;
create external table jms_dwd.dwd_all_operation_cnt_detail_dt(
   waybill_no             string       comment  '运单号'
  ,network_code           string       comment  '网点code'
  ,network_name           string       comment  '网点名称'
  ,input_time             timestamp    comment  '运单录入时间'
  ,send_scantime          timestamp    comment  '发件时间'
  ,arrival_scantime       timestamp    comment  '到件时间'
  ,deliver_scantime       timestamp    comment  '派件时间'
  ,sign_scantime          timestamp    comment  '签收时间'
  ,collect_staff_name     string       comment  '揽件业务员'
  ,send_scanuser          string       comment  '发件业务员'
  ,arrival_scanuser       string       comment  '到件业务员'
  ,deliver_scanuser       string       comment  '派件业务员'
  ,sign_scanuser          string       comment  '签收业务员'
  ,next_network_name      string       comment  '下一站网点名称'
  ,previous_network_name  string       comment  '上一站网点名称'
  ,package_collect_weight decimal(9,2) comment  '收件重量(千克)'
  ,provider_desc          string       comment  '省'
  ,city_desc              string       comment  '市'
  ,area_desc              string       comment  '区县'
  ,agent_code             string       comment  '代理区code'
  ,agent_name             string       comment  '代理区名称'
  ,franchisee_code        string       comment  '加盟商编码'
  ,franchisee_name        string       comment  '加盟商名称'
 )
 comment '运单全流程单量明细表'
 partitioned by (dt string comment '更新/创建日期 (yyyy-mm-dd)')
 stored as parquet
 location '/dw/hive/jms_dwd.db/external/dwd_all_operation_cnt_detail_dt'
 tblproperties (
 'parquet.column.index.access'='true'
 );